//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.comprosoft.telnet.command;

import com.comprosoft.telnet.io.IOHandler;
import com.comprosoft.telnet.io.TextColor;
import com.comprosoft.telnet.server.TelnetServer;
import java.util.ArrayList;
import java.util.Iterator;

public final class MultipleCommandsHandler extends Command {
    private final ArrayList<AllCommands> commands;

    public MultipleCommandsHandler(IOHandler io, ArrayList<AllCommands> cmds, TelnetServer telnetServer) {
        super(io, "Multiple Commands Handler", telnetServer);
        this.commands = cmds;
    }

    protected CommandResult handleCommand(String[] args) {
        IOHandler io = super.getIOHandler();
        io.SetTextColor(TextColor.RED);
        io.Write("Error: ");
        io.SetTextColor(TextColor.CYAN);
        io.WriteLine("Resolves to multiple commands!");
        Iterator var3 = this.commands.iterator();

        while(var3.hasNext()) {
            AllCommands c = (AllCommands)var3.next();
            super.getIOHandler().WriteLine("\t" + c.getName());
        }

        return CommandResult.COMMAND_OK;
    }
}
